package com.icesoft.system.auth.entity;

import lombok.Getter;
import lombok.Setter;
import org.apache.shiro.authc.RememberMeAuthenticationToken;

@Getter
@Setter
public class AuthToken implements RememberMeAuthenticationToken {

	private boolean rememberMe;
	private boolean validPassword = true;

	private String token;
	private LoginUser<?> loginUser;

	public AuthToken() {
	}

	public AuthToken(String token) {
		this.token = token;
	}

	public AuthToken(String token, LoginUser<?> loginUser) {
		this.token = token;
		this.loginUser = loginUser;
	}

	@Override
	public Object getPrincipal() {
		return token;
	}

	@Override
	public Object getCredentials() {
		return token;
	}
}
